/**
 * 员工详情视图
 */
Ext.define('app.view.staff.Detail',{
	extend:'Ext.form.Panel',
	alias:'widget.staffdetail',
	title:'用户信息详情',
	
	layout:'column',
		
		defaultType:'displayfield',
		defaults:{		//表单默认属性
			labelSeparator : ": ",
			labelWidth : 80,
			width : 220,
			allowBlank : false,	//表单不为空
			msgTarget : 'side',
			labelAlign:'right',	//标签右对齐
			blankText : '不能为空' ,
		},
		border:false,
		dockedItems:[
						{//顶部工具栏
						    xtype: 'toolbar',
						    dock: 'top',
						    
						    items: [			     
						          {xtype:'button',text:'修改个人信息',action:'updateStaff'},//按钮
								  {xtype:'button',text:'修改密码',action:'updatePwd'},
							      ]
						},
					],
		items:[
		       {
			xtype:'image',
			id:'myImage',
			columnWidth: .4,
			}		
		       ,{
            columnWidth: .3,  
            xtype: 'fieldset',  
            title: '基本信息',  
            layout: 'form',  
            defaultType:'displayfield',
            defaults: {anchor: '95%'},  
            style: 'margin-left: 5px;padding-left: 5px;', 
            items:[  
                   
			       {name:'name',fieldLabel:'姓名',},
			       {name:'ename',fieldLabel:'英文名',},
			       {name:'sex',fieldLabel:'性别',renderer:function(value,v,obj){
			    	   if(value==1){
			    	       return '男';
			    	     }else if(value==0){
			    	      return '女';
			    	     } else{
			    	      return '未知';
			    	     }
			    	}},	
			       {name:'age',fieldLabel:'年龄',},
			       {name:'address',fieldLabel:'地址',},			       
			       {name:'birthday',fieldLabel:'生日',format : 'Y-m-d'},
			       {name:'tel',fieldLabel:'电话',},
			       {name:'email',fieldLabel:'邮箱',},
			       {name:'area',fieldLabel:'户籍',},
		       ],
		},{
            columnWidth: .3,  
            xtype: 'fieldset',
            defaultType:'displayfield',
            title: '公司相关信息',  
            layout: 'form',  
            defaults: {anchor: '95%'},  
            style: 'margin-left: 5px;padding-left: 5px;', 
            items:[  
               {name:'department',fieldLabel:'部门',},	       
		       {name:'sid',fieldLabel:'工号',},
		       {name:'position',fieldLabel:'职位',},		       			       
		       {name:'stime',fieldLabel:'入职时间',format : 'Y-m-d'},
		       {name:'etime',fieldLabel:'离职时间',format : 'Y-m-d'},		      		       
		       {name:'rtime',fieldLabel:'转正时间',format : 'Y-m-d'},
		       ],
		}		       		    	    		    
		]

	
})


